package org.meproj.cloudscale.algos;

import java.util.List;
import java.util.SortedSet;

import org.meproj.cloudscale.database.DbUtil;
import org.meproj.cloudscale.utils.Constants;

public class DetectBurstPattern {

	DbUtil dbUtil = new DbUtil();
	
	public int predictBurstBasedOnHistory(float violationDegree) {
		
		List<Long> timeList = dbUtil.getTimeForAllSameBurst(violationDegree);
		SortedSet<Float> last10Burst = dbUtil.getLast10BurstPattern(timeList, Constants.TIME_PERIOD_FOR_LOCAL_MAXIMA.getIntValue());
		
		return suggestPaddingForBurst(last10Burst);
	}
	
	public int suggestPaddingForBurst(SortedSet<Float> last10Burst) {
		
		int countOfVMs = 0;
		
		// calculate WMA for these 10 entries.
		
		
		return countOfVMs;
	}
}
